<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
include("tietokantaRajapinta.php");
$tulos = palautaKayttajat();
    $tun = $tulos[0];
    $sal = $tulos[1];
    $id = $tulos[2];
for ($i = 0; $i < count($tun); $i++) {
    echo $tun[$i]; ?><br><?php
    echo $id[$i]; ?><br><?php
    echo $sal[$i]; ?><br><br><?php
}

echo "kurssit"; ?><br><br><?php
$tulos = palautaKurssit();
    $tun = $tulos[0];
    $sal = $tulos[1];
    $id = $tulos[2];
for ($i = 0; $i < count($tun); $i++) {
    echo $tun[$i]; ?><br><?php
    echo $id[$i]; ?><br><?php
    echo $sal[$i]; ?><br><br><?php
}

echo "tapahtumat"; ?><br><br><?php
$tulos = palautaTapahtumat();
    $tun = $tulos[0];
    $sal = $tulos[1];
for ($i = 0; $i < count($tun); $i++) {
    echo $tun[$i]; ?><br><?php
    echo $sal[$i]; ?><br><br><?php
}

echo "ilmot:"; ?><br><br><?php
$tulos = palautaIlmot();
    $tun = $tulos[0];
    $sal = $tulos[1];
    $id = $tulos[2];
for ($i = 0; $i < count($tun); $i++) {
    echo $tun[$i]; ?><br><?php
    if($id[$i]){
        echo "suoritettu";
    }else{
        echo "ilmottu";
    } ?><br><?php
    echo $sal[$i]; ?><br><br><?php
}
?>
